<template>
  <div>
    <h1>购物车</h1>
    <button @click="push" class="push">push</button>
    <button @click="$router.push({ name: 'personcenter' })">
      go personcenter
    </button>
  </div>
</template>

<script>
export default {
  methods: {
    push() {
      //   this.$router.push("/shouye");
      //   this.$router.replace("/shouye");
      //   this.$router.push({ path: "/shouye" });
      this.$router.push({ name: "shouye" });
    },
  },
};
</script>

<style lang="scss" scoped>
.push {
  width: 250px;
  height: 100px;
  font-size: 50px;
}
</style>